#ifndef QAVPACKET_H
#define QAVPACKET_H

#include "qavframe.h"
#include <QObject>
#include <memory>

QT_BEGIN_NAMESPACE

struct AVPacket;
class QAVPacketPrivate;
class QAVStream;
class QAVPacket : public QObject
{
public:
    QAVPacket(QObject* parent = nullptr);
    ~QAVPacket();
    QAVPacket(const QAVPacket &other);
    QAVPacket &operator=(const QAVPacket &other);
    operator bool() const;

    void setTimeBase(const AVRational &value);
    AVPacket* packet() const;
    double duration() const;
    double pts() const;

protected:
    std::unique_ptr<QAVPacketPrivate> d_ptr;

private:
    Q_DECLARE_PRIVATE(QAVPacket)
};

QT_END_NAMESPACE

#endif
